﻿ALTER TABLE [Auth].[Accounts]
	ADD CONSTRAINT [CK_Accounts_PasswordScheme] 
	CHECK (
	        (AuthenticationTypeID = 1 AND COALESCE(LEN(Password), 0) > 0)
	        OR
	        (AuthenticationTypeID <> 1 AND Password IS NULL)
	      )
